﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace BattleforgeAssault.Cards
{
    /// <summary>
    /// Effect to add a token to a quest at the start of the owners turn when there is a unit questing.
    /// </summary>
    public class AddTokenToQuest : Effect
    {
        public AddTokenToQuest() { Trigger = "PreStartOfTurnPhase"; }

        public override bool Applicable(GameObject sender)
        {
            Quest source = Source as Quest;

            return (source.Game.ActivePlayer == source.Controller && source.Questing != null);
        }

        public override void Apply(GameObject sender)
        {
            Quest source = Source as Quest;

            source.Tokens += 1;
        }
    }
}
